﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
//using BTGISWASECO.BusinessEntities;

/// <summary>
/// Summary description for DiemDauNoiEntities
/// </summary>
namespace BTGISWASECO.BusinessEntities
{
    public class DiemDauNoiEntities
    {
        #region khai bao thuoc tinh
        private int _objectID;
        private string _IDOngNoi;
        private string _IDDMZ;
        private string _IDDMA;
        private int _TieuChuan;
        private string _TieuChuanText;
        private int _TinhTrang;
        private string _TinhTrangText;
        private int _DonViQL;
        private string _DonViQLText;
        private string _KichCo;
        private string _KichCoText;
        private string _LoaiOngNoi;
        private string _LoaiOngNoiText;
        private int _ThuocSoHuu;
        private string _ThuocSoHuuText;
        private int _SoLanSuCo;
        private DateTime _NgayCNCuoi;
        private string _NguoiCNCuoi;
        private string _IDHinhAnh;
        private string _GhiChu;
        private string _Ten;

        public string Ten
        {
            get { return _Ten; }
            set { _Ten = value; }
        }

        public int ThuocSoHuu
        {
            get { return _ThuocSoHuu; }
            set { _ThuocSoHuu = value; }
        }

        public string ThuocSoHuuText
        {
            get { return _ThuocSoHuuText; }
            set { _ThuocSoHuuText = value; }
        }

        public string LoaiOngNoiText
        {
            get { return _LoaiOngNoiText; }
            set { _LoaiOngNoiText = value; }
        }

        public string LoaiOngNoi
        {
            get { return _LoaiOngNoi; }
            set { _LoaiOngNoi = value; }
        }


        public string KichCoText
        {
            get { return _KichCoText; }
            set { _KichCoText = value; }
        }


        public string KichCo
        {
            get { return _KichCo; }
            set { _KichCo = value; }
        }


        public int SoLanSuCo
        {
            get { return _SoLanSuCo; }
            set { _SoLanSuCo = value; }
        }


        public string DonViQLText
        {
            get { return _DonViQLText; }
            set { _DonViQLText = value; }
        }


        public string TinhTrangText
        {
            get { return _TinhTrangText; }
            set { _TinhTrangText = value; }
        }


        public string TieuChuanText
        {
            get { return _TieuChuanText; }
            set { _TieuChuanText = value; }
        }


        public string GhiChu
        {
            get { return _GhiChu; }
            set { _GhiChu = value; }
        }


        public string IDHinhAnh
        {
            get { return _IDHinhAnh; }
            set { _IDHinhAnh = value; }
        }

        public string NguoiCNCuoi
        {
            get { return _NguoiCNCuoi; }
            set { _NguoiCNCuoi = value; }
        }


        public DateTime NgayCNCuoi
        {
            get { return _NgayCNCuoi; }
            set { _NgayCNCuoi = value; }
        }


        public int DonViQL
        {
            get { return _DonViQL; }
            set { _DonViQL = value; }
        }

        public int TinhTrang
        {
            get { return _TinhTrang; }
            set { _TinhTrang = value; }
        }


        public int TieuChuan
        {
            get { return _TieuChuan; }
            set { _TieuChuan = value; }
        }
        

        public int OBJECTID
        {
            get { return _objectID; }
            set { _objectID = value; }
        }

        public string IDDiemDauNoi
        {
            get { return _IDOngNoi; }
            set { _IDOngNoi = value; }
        }

        public string IDDMZ
        {
            get { return _IDDMZ; }
            set { _IDDMZ = value; }
        }

        public string IDDMA
        {
            get { return _IDDMA; }
            set { _IDDMA = value; }
        }


        # endregion khai bao

        #region phuong thuc

        public DiemDauNoiEntities()
        {

        }

        public DiemDauNoiEntities(string IDOngNoi, string IDDMZ, string IDDMA, int TieuChuan, int TinhTrang,
            int DonViQL, string KichCo, string LoaiOngNoi, int ThuocSoHuu, int SoLanSuCo, DateTime NgayCNCuoi,
            string NguoiCNCuoi, string IDHinhAnh, string GhiChu, string Ten)
        {
            //Begin Ninh Thuan
            this._IDOngNoi = IDDiemDauNoi;
            this._IDDMZ = IDDMZ;
            this._IDDMA = IDDMA;
            this._TieuChuan = TieuChuan;
            this._TinhTrang = TinhTrang;
            this._DonViQL = DonViQL;
            this._KichCo = KichCo;
            this._LoaiOngNoi = LoaiOngNoi;
            this._ThuocSoHuu = ThuocSoHuu;
            this._SoLanSuCo = SoLanSuCo;
            this._NguoiCNCuoi = NguoiCNCuoi;
            this._NgayCNCuoi = NgayCNCuoi;
            this._GhiChu = GhiChu;
            this.IDHinhAnh = IDHinhAnh;
            this._Ten = Ten;
        }
        public DiemDauNoiEntities(int OBJECTID, string IDOngNoi, string IDDMZ, string IDDMA, int TieuChuan, int TinhTrang,
            int DonViQL, string KichCo, string LoaiOngNoi, int ThuocSoHuu, int SoLanSuCo, DateTime NgayCNCuoi,
            string NguoiCNCuoi, string IDHinhAnh, string GhiChu, string Ten)
        {
            this._objectID = OBJECTID;
            //Begin Ninh Thuan
            this._IDOngNoi = IDDiemDauNoi;
            this._IDDMZ = IDDMZ;
            this._IDDMA = IDDMA;
            this._TieuChuan = TieuChuan;
            this._TinhTrang = TinhTrang;
            this._DonViQL = DonViQL;
            this._KichCo = KichCo;
            this._LoaiOngNoi = LoaiOngNoi;
            this._ThuocSoHuu = ThuocSoHuu;
            this._SoLanSuCo = SoLanSuCo;
            this._NguoiCNCuoi = NguoiCNCuoi;
            this._NgayCNCuoi = NgayCNCuoi;
            this._GhiChu = GhiChu;
            this.IDHinhAnh = IDHinhAnh;
            this._Ten = Ten;
        }

        public DiemDauNoiEntities(DataRow row)
        {
            this._objectID = Convert.ToInt32(row["OBJECTID"]);
            this._IDOngNoi = row["IDOngNoi"].ToString();
            this._IDDMA = row["IDDMA"].ToString();
            this._IDDMZ = row["IDDMZ"].ToString();
            if (row["TieuChuan"]!=null)
            this._TieuChuanText = row["TieuChuan"].ToString();
            this._TinhTrangText = row["TinhTrang"].ToString();
            //if (row["DonViQL"].ToString() != "Null")
            this._DonViQLText = row["DonViQL"].ToString();
            this._KichCoText = row["KichCo"].ToString();
            this._LoaiOngNoiText = row["LoaiOngNoi"].ToString();
            this._ThuocSoHuuText = row["ThuocSoHuu"].ToString();
            if (row["SoLanSuCo"].ToString() != "Null")
                this._SoLanSuCo = Convert.ToInt32(row["SoLanSuCo"]);

            if (row["NgayCNCuoi"].ToString() != "Null")
                this._NgayCNCuoi = Convert.ToDateTime(row["NgayCNCuoi"]);
            this._NguoiCNCuoi = row["NguoiCNCuoi"].ToString();
            this._IDHinhAnh = row["IDHinhAnh"].ToString();
            this._GhiChu = row["GhiChu"].ToString();
            this._Ten = row["Ten"].ToString();
        }


        //public DiemDauNoiEntities DiemDauNoiIDataReader(IDataReader dr)
        //{
        //    BTGISWASECO.BusinessEntities.DiemDauNoiEntities obj = new BTGISWASECO.BusinessEntities.DiemDauNoiEntities();
        //    obj._objectID = (dr["ObjectID"] is DBNull) ? -1 : Convert.ToInt32(dr["ObjectID"]);
        //    obj._IDDiemDauNoi = (dr["IDDiemDauNoi"] is DBNull) ? string.Empty : dr["_IDDiemDauNoi"].ToString();
        //    obj._IDDMA = (dr["IDDMA"] is DBNull) ? string.Empty : dr["_IDDMA"].ToString();
        //    obj._ChieuDongDiemDauNoi = (Convert.ToInt32(dr["ChieuDongDiemDauNoi"]) >= 0) ? 0 : Convert.ToInt32(dr["ChieuDongDiemDauNoi"]);
        //    obj._SVDongDiemDauNoi = (dr["SVDongDiemDauNoi"] is DBNull) ? 0 : Convert.ToInt32(dr["SVDongDiemDauNoi"]);
        //    return obj;
        //}

        #endregion phuong thuc
    }
}